package xiaohu.day2.HJ29;

import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLine()) { // 注意 while 处理多个 case
            String one = in.nextLine();
            char[] oneArr = one.toCharArray();
            String two = in.nextLine();
            char[] twoArr = two.toCharArray();
            StringBuffer enc = new StringBuffer();
            StringBuffer dec = new StringBuffer();
            for (char c : oneArr) {
                enc.append(convert(c,1));
            }

            for (char c : twoArr) {
                dec.append(convert(c,2));
            }
            System.out.println(enc);
            System.out.println(dec);
        }
    }

    private static char convert(char a, int type) {
        if (type == 1){
            if (a >= 'a' && a < 'z') {
                return (char) (a - 31);
            }
            if (a >= 'A' && a < 'Z') {
                return (char) (a + 33);
            }
            if (a >= '0' && a < '9') {
                return (char) (a + 1);
            }
            if (a == 'z') {
                return 'A';
            }
            if (a == 'Z') {
                return 'a';
            }
            if (a == '9') {
                return '0';
            }
        }else {
            if (a > 'a' && a <= 'z') {
                return (char) (a - 33);
            }
            if (a > 'A' && a <= 'Z') {
                return (char) (a + 31);
            }
            if (a > '0' && a <= '9') {
                return (char) (a - 1);
            }
            if (a == 'a') {
                return 'Z';
            }
            if (a == 'A') {
                return 'z';
            }
            if (a == '0') {
                return '9';
            }
        }
        return a;
    }
}
